﻿using Samurai.WorkflowGraph.Models;

namespace Samurai.WorkflowGraph.ViewModels
{
    public class GraphSource : GraphSourceBase<WorkflowStepNode, Link>
    {
        public void PopulateGraphSource(WorkflowStepNode node)
        {
            AddNode(node);
            foreach (WorkflowStepNode subNode in node.Children)
            {
                var link = new Link(node, subNode, subNode.Thread);
                AddLink(link);
                PopulateGraphSource(subNode);
            }
        }
    }
}